#import "ALDetailToolbarButtonCell.h"



#pragma mark Constants


#pragma mark -
#pragma mark Class Globals
static NSGradient *ALDetailToolbarButtonCellPressedGradient;


#pragma mark -
@interface ALDetailToolbarButtonCell (ALDetailToolbarButtonCellPrivateMethods)

@end


#pragma mark -
@implementation ALDetailToolbarButtonCell

+(void)initialize {
	NSColor *startColor = [NSColor colorWithCalibratedWhite:0.5f alpha:1.0f];
	NSColor *endColor = [NSColor colorWithCalibratedWhite:0.6f alpha:1.0f];
	ALDetailToolbarButtonCellPressedGradient = [[NSGradient alloc] initWithStartingColor:startColor endingColor:endColor];
}

-(void)drawBezelWithFrame:(NSRect)frame inView:(NSView *)controlView {
	if (![self isHighlighted] && ([self showsStateBy] == NSNoCellMask || ([self showsStateBy] != NSNoCellMask && [self state] == NSOffState)))
		return;
	[ALDetailToolbarButtonCellPressedGradient drawInRect:frame angle:90];
}

@end
